<?php 
class Block_Auth extends BlockHelper{
	public function render(){
		$context = $this->parram['context'];
		$url = $context->getBaseUrl().'Administrator/UserSystem/logout/default.html';
		$url .= '?return='.$context->getRequestUrl();
		$auth = Auth::getSession();
		$imageLink = URLUltil::getImageUrl($context, "usersystem", $auth[UserSystem::IMAGE]);
		echo '<a href="'.$url.'"><img class="thumb" src="'.$imageLink.'"></a>';
		echo '<div class="uinfo">';
		echo '<a class="uname" href="#">'.$auth['name'].'</a>';
		echo '<span class="urole">'.$auth['rolename'].'</span>';
		echo '</div>';
	}
}
